gh-104683: Improve consistency and test coverage of argument-clinic __repr__
functions
#107667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Several of the
__repr__
functions inTools/clinic/
have no test coverage at the moment, so this PR started life as an attempt to get some easy coverage improvements. While working on adding coverage for the__repr__
functions, however, I noticed that the reprs for classes inTools/clinic/
can be pretty inconsistent -- e.g.Function
objects describe themselves asclinic.Function
objects in their reprs, butDestination
objects just describe themselves asDestination
objects. Some classes quoted theirself.name
attribute in their__repr__
methods; others didn't. This PR therefore also improves the consistency of the__repr__
methods inTools/clinic/
.Coverage prior to this PR:
Coverage with this PR:
So, no change to the top-line stat, but a reasonable reduction in uncovered statements.
Tools/clinic/
#104683